<?php
class Resident extends AppModel {
	var $name = 'Resident';
	var $primaryKey = 'resident_id';

	function getResidentList() {
		$residents = $this->query("SELECT resident_id, lastName, firstName FROM residents");
		$residentList = array();
		foreach($residents as $resident) {
			$residentId = $resident['residents']['resident_id'];
			$firstName = $resident['residents']['firstName'];
			$lastName = $resident['residents']['lastName'];
			$residentList[$residentId] = "$lastName, $firstName";
		}
		return $residentList;
	}
}
?>
